/*
 * @Author: mikey.zhaopeng 
 * @Date: 2018-05-18 15:07:18 
 * @Last Modified by:   mikey.zhaopeng 
 * @Last Modified time: 2018-05-18 15:07:18 
 */
<template>
  <bg-lay-out>
    <div slot="headerText">浩德鑫置地数据中心</div>
    <top-bar-sel :barWidth="'20%'" slot="headerMain"  :topNav="topNav" @changeTab="onNav"></top-bar-sel>
    <div slot="main" style="position:relative">
    	<div v-if="tabId == '1'">
    		<sell-marketing :time="statisticalTime"></sell-marketing>
    	</div>
    	<div v-if="tabId == '2'">
    		<!-- <sel-date class="selDateCon" @onTime='onTime'></sel-date> -->
    		<sell-receivables :time="statisticalTime"></sell-receivables>
    	</div>
    </div>
  </bg-lay-out>
</template>
<script>
import bgLayOut from "@/components/bgLayOut/index";
import sellReceivables from "./sellReceivables";
import sellMarketing from "./sellMarketing";
import topBarSel from "@/components/branch/topBarSel";
export default {
  name: "index",
  components: {
    bgLayOut,
    sellReceivables,
    sellMarketing,
    topBarSel
  },
  data() {
    return {
      tabId: "1",
      statisticalTime: "",
      topNav: [
        {
          name: "地产营销分析",
          id: "1"
        }

        // {
        //   name: "工程进度",
        //   id: "2"
        // }
      ]
    };
  },
  mounted() {},
  methods: {
    onTime(res) {
      (this.statisticalTime = res)
      this.onNav(this.tabId);
    },
    onNav(id) {
      this.tabId = id;
    },
    // 跳页面
    pushPage(name) {
      this.$router.push({
        path: name
      });
    }
  }
};
</script>
<style>
@import "../../../../styles/element-ui/select.css";
</style>
<style scoped>
.selDateCon {
  position: absolute;
  top: 0;
  z-index: 3;
}
</style>
